<?php
	session_start();
	
	//validate user logged in; if not, redirect to login
	if(!isset($_SESSION['employee_id'])){
		header("location:login.php");
	}
	
	//redirect to mobile version if mobile
	include "controller/php/mobile_handler.php";
	if(IsMobile()) {
		header("location:mobile/home.php");
	}
?>

<html>
	<head>
		<link rel="stylesheet" type="text/css" href="view/css/application.css" />
		<script type="text/javascript" src="view/javascript/application.js" ></script>
		<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
	</head>
	<body>	
			
		<div id="content">
			<?php
				include "controller/php/navigation.php";
				
				echo renderNavigation();
			?>
		
			<div id="error_msg">
				<p>
					<?php
						include "controller/php/error_handler.php";
					
						if(isset($_GET['error']))
						{
							$errMsg = GetErrorMsgForId($_GET['error']);
							echo "$errMsg";
						}
					?> &nbsp;
				</p>
			</div>
			
			<div id="formSelect">
				<h2>Select a form</h2>
				<ul>
					<li>
						<a href="form.php?form_id=0">Time Sheet Form</a>
					</li>
				</ul>
			</div>
		</div>
	</body>
</html>